﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/OnlyAuthenticated/GeneratorMasterPage.master" Inherits="OnlyAuthenticated_OnlyManagers_EditSpecialitati" CodeBehind="EditSpecialitati.aspx.cs" %>


<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="GeneratorPageContent">

    <style type="text/css">
        .style1
        {
            width: 204px;
        }
        .style2
        {
            width: 54px;
        }
    </style>

    <h2>Sterge/Adauga Specialitati
    </h2>
    <br />
    <div>
        <h3>Lista cu specialitatile existente in baza de date: </h3>

        <table width="600px" style="height: 215px">
            <tr>
                <td class="style1">&nbsp;</td>
                <td class="style1">&nbsp;
                    <asp:ListBox ID="ListBox1" runat="server" BorderColor="#0099FF"
                        DataSourceID="DBConnectionString"
                        DataTextField="NumeSpecialitate" DataValueField="NumeSpecialitate"
                        SelectionMode="Multiple" Width="269px"
                        OnSelectedIndexChanged="ListBox1_SelectedIndexChanged" Rows="10" CssClass="page"></asp:ListBox>

                    <asp:SqlDataSource ID="DBConnectionString" runat="server"
                        ConnectionString="<%$ ConnectionStrings:DBConnectionString %>"
                        SelectCommand="SELECT [ID], [NumeSpecialitate] FROM [DenumiriSpecialitati] ORDER BY [NumeSpecialitate]"></asp:SqlDataSource>
                </td>
                <td>
                    <asp:Button ID="Button2" runat="server" Text="Sterge selectiile"
                        OnClick="Button2_Click" ForeColor="Red" />

                    <br />
                    <br />
                    <asp:Button ID="Button3" runat="server" OnClick="Button3_Click"
                        Text="Refresh" />
                </td>
            </tr>
        </table>
        <br />
        &nbsp;&nbsp;&nbsp;

    </div>
    <br />
    <br />
    <div>

        <h3>Adauga o specialitate noua:</h3>
        <p>&nbsp;</p>
        <table style="width: 100%;">
            <tr>
                <td class="style2">&nbsp;
                </td>
                <td>Denumire specialitate:
                    <asp:TextBox ID="TextBox1" runat="server" Width="265px"></asp:TextBox>
                    &nbsp;&nbsp;
                    <asp:Button ID="Button1" runat="server" Text="Adauga" OnClick="Button1_Click"
                        OnClientClick="showConfirmMessage()" ForeColor="Red" />
                    &nbsp;
                </td>
            </tr>
        </table>
        <br />
    </div>

    <script>

        function showConfirmMessage() {
            alert("Specializarea '" + document.getElementById('<%= TextBox1.ClientID %>').value + "' a fost adaugata");
        }
    </script>

</asp:Content>
